home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-18 | 771 b | 30 lines | [TEXT/NTP1] |
-
- func getSound(rsrcName, is11kHz) // apologies to Tom Hedges
- begin
- local snd := {
- sndFrameType: 'simpleSound,
- samplingRate: 22026.0,
- dataType: 1,
- compressionType: 0};
-
- if is11kHz then
- begin
- snd.samples := GetSndAsSamplesRate11KHz(rsrcName);
- snd.samplingRate := 11013.0
- end
- else
- begin
- snd.samples := GetSndAsSamples(rsrcName);
- snd.samplingRate := 22026.0
- end;
-
- return snd
- end;
-
- rf := OpenResFileX("::newton apps:helloworld:hello.rsrc");
-
- patrickSound := getSound("Patrick", TRUE);
- chrisSound := getSound("Christopher", TRUE);
- kaitSound := getSound("Kaitlyn", TRUE);
-
- CloseResFileX(rf);